package com.xiyin.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiyin.entity.UserBatch;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xukaihang
 * @since 2024-08-18
 */
public interface UserBatchMapper extends BaseMapper<UserBatch> {

    List<UserBatch> zidingyiBySQL(int age);

    @Select("select * from user_batch where age = #{age}")
    List<UserBatch> zidingyiByZhujie(int age);

    @Select("select * from user_batch ${ew.customSqlSegment}")
    List<UserBatch> zidingyiByCondition(@Param("ew") Wrapper<UserBatch> wrapper);
}
